package exercise;

class NotePad extends Computer {
    private String color;
//构造器
    public NotePad(String cpu, int memory, int hardDisk, String color) {
        super(cpu, memory, hardDisk);
        this.color = color;
    }
//设置属性
    public void setColor(String color) {
        this.color = color;
    }
//得到属性
    public String getColor() {
        return " 颜色 = " + color;
    }
    //输出信息
    public void getInfo() {
        System.out.println(getDetails() + getColor());
    }
}